<template>
 <Swipe :autoplay="3000" indicator-color="white" class="my-swipe">
      <SwipeItem class="van-swipe-item" v-for="item in banners" :key="item.targetId">
        <img :src="item.imageUrl"/>
      </SwipeItem>
  </Swipe>
</template>

<script setup>
import { Swipe, SwipeItem } from 'vant';
import { defineProps } from "vue";
 
// 获取父组件传值
defineProps({
  banners:Array
})
</script>

<style lang="stylus">
.my-swipe .van-swipe-item 
    box-sizing border-box
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
    height 150px
    border-radius 10px
    overflow hidden
    img
      width 100%
      height 100%
</style>